package com.heima.admin.controller;


import com.heima.admin.service.SensitiveService;
import com.heima.model.admin.dto.AdUserLoginDto;
import com.heima.model.admin.dto.SensitiveDto;
import com.heima.model.admin.entity.AdSensitive;
import com.heima.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(path = "/api/v1/sensitive")
@Api(value = "敏感词管理",tags = "敏感词" ,description = "敏感词管理API")
public class SensitiveController {


    @Autowired
    private SensitiveService sensitiveService;

    // /api/v1/sensitive/save

   /* @PostMapping(path = "/save")
    @ApiOperation("敏感词保存接口")
    public ResponseResult save(@RequestBody AdUserLoginDto dto){
        return .login(dto);
    }*/

    @PostMapping(path = "/list")
    @ApiOperation("敏感词查询接口")
    public ResponseResult list(@RequestBody SensitiveDto dto){
        return  sensitiveService.list(dto);

    }


}
